<!DOCTYPE html>
<html lang="zh-CN">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
    <title>易渔 - 登录 / 注册</title>
    <link href="https://cdnjs.cloudflare.com/ajax/libs/tailwindcss/2.2.19/tailwind.min.css" rel="stylesheet">
    <link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css" rel="stylesheet">
    <link href="css/style.css" rel="stylesheet">
    <link rel="icon" href="assets/logo/logo.png">
</head>

<body class="bg-gray-100 min-h-screen">
    <div id="particles-js" class="fixed inset-0 z-0"></div>

    <!-- 导航栏 -->
    <nav class="bg-gradient-to-r from-blue-700 to-blue-500 text-white shadow-lg relative z-10">
        <div class="container mx-auto px-4 py-3">
            <div class="flex flex-wrap justify-between items-center">
                <div class="flex items-center">
                    <img src="assets/logo/logo.png" alt="易渔" style="width: 30px;height: 40px;">
                    <a href="index.html" class="text-2xl font-bold">易渔</a>
                </div>
                <div class="hidden md:flex space-x-8 text-lg">
                    <a href="index.html" class="hover:text-blue-200 transition duration-300">首页</a>
                    <a href="forum.html" class="hover:text-blue-200 transition duration-300">论坛</a>
                    <a href="mall.html" class="hover:text-blue-200 transition duration-300">商城</a>
                    <a href="#" class="hover:text-blue-200 transition duration-300">社区活动</a>
                    <a href="#" class="hover:text-blue-200 transition duration-300">钓技研究</a>
                </div>
                <div class="flex items-center">
                    <a href="cart.html" class="mr-4 relative">
                        <i class="fas fa-shopping-cart text-xl"></i>
                        <span id="cart-count"
                            class="absolute -top-2 -right-2 bg-red-500 text-white rounded-full h-5 w-5 flex items-center justify-center text-xs">0</span>
                    </a>
                    <button id="mobile-menu-btn" class="md:hidden ml-4">
                        <i class="fas fa-bars text-2xl"></i>
                    </button>
                </div>
            </div>
            <!-- 移动端菜单 -->
            <div id="mobile-menu" class="hidden md:hidden w-full mt-3">
                <a href="index.html" class="block py-2 hover:bg-blue-600 px-2 rounded">首页</a>
                <a href="forum.html" class="block py-2 hover:bg-blue-600 px-2 rounded">论坛</a>
                <a href="mall.html" class="block py-2 hover:bg-blue-600 px-2 rounded">商城</a>
                <a href="#" class="block py-2 hover:bg-blue-600 px-2 rounded">社区活动</a>
                <a href="#" class="block py-2 hover:bg-blue-600 px-2 rounded">钓技研究</a>
            </div>
        </div>
    </nav>

    <!-- 认证表单区域 -->
    <div class="container mx-auto px-4 py-12 relative z-10">
        <div class="max-w-md mx-auto bg-white rounded-xl shadow-xl overflow-hidden">
            <div class="p-8">
                <!-- 标签切换器 -->
                <div class="flex border-b border-gray-200">
                    <button id="login-tab"
                        class="flex-1 py-3 font-medium text-center border-b-2 border-blue-500 text-blue-600">登录</button>
                    <button id="register-tab"
                        class="flex-1 py-3 font-medium text-center text-gray-500 hover:text-gray-700">注册</button>
                </div>

                <!-- 登录表单 -->
                <div id="login-form" class="mt-8">
                    <div class="mb-6">
                        <label for="login-username" class="block text-gray-700 text-sm font-medium mb-2">用户名</label>
                        <div class="relative">
                            <div class="absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none">
                                <i class="fas fa-user text-gray-400"></i>
                            </div>
                            <input id="login-username" type="text"
                                class="pl-10 w-full py-3 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent"
                                placeholder="请输入您的用户名">
                        </div>
                        <p id="login-username-error" class="text-red-500 text-xs mt-1 hidden">请输入用户名</p>
                    </div>
                    <div class="mb-6">
                        <label for="login-password" class="block text-gray-700 text-sm font-medium mb-2">密码</label>
                        <div class="relative">
                            <div class="absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none">
                                <i class="fas fa-lock text-gray-400"></i>
                            </div>
                            <input id="login-password" type="password"
                                class="pl-10 w-full py-3 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent"
                                placeholder="请输入密码">
                            <button id="toggle-login-password" type="button"
                                class="absolute inset-y-0 right-0 pr-3 flex items-center">
                                <i class="fas fa-eye-slash text-gray-400"></i>
                            </button>
                        </div>
                        <p id="login-password-error" class="text-red-500 text-xs mt-1 hidden">请输入密码</p>
                    </div>
                    <div class="flex justify-between items-center mb-6">
                        <div class="flex items-center">
                            <input id="remember-me" type="checkbox"
                                class="h-4 w-4 text-blue-600 focus:ring-blue-500 border-gray-300 rounded">
                            <label for="remember-me" class="ml-2 block text-sm text-gray-700">记住我</label>
                        </div>
                        <a href="#" class="text-sm text-blue-600 hover:text-blue-800">忘记密码？</a>
                    </div>
                    <div class="mb-6">
                        <button id="login-button"
                            class="w-full bg-gradient-to-r from-blue-600 to-blue-500 text-white py-3 px-4 rounded-lg hover:from-blue-700 hover:to-blue-600 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2 transition-all duration-300 transform hover:-translate-y-0.5">
                            <i class="fas fa-sign-in-alt mr-2"></i>登录
                        </button>
                    </div>
                    <div class="text-center">
                        <p class="text-sm text-gray-600">还没有账号？ <a href="#" id="switch-to-register"
                                class="text-blue-600 hover:text-blue-800">立即注册</a></p>
                    </div>
                    <div class="relative flex items-center justify-center mt-6">
                        <div class="absolute border-t border-gray-300 w-full"></div>
                        <div class="relative bg-white px-4 text-sm text-gray-500">其他登录方式</div>
                    </div>
                    <div class="mt-6 grid grid-cols-3 gap-3">
                        <button
                            class="flex justify-center items-center py-2 px-4 border border-gray-300 rounded-md shadow-sm bg-white hover:bg-gray-50">
                            <i class="fab fa-weixin text-green-600 text-xl"></i>
                        </button>
                        <button
                            class="flex justify-center items-center py-2 px-4 border border-gray-300 rounded-md shadow-sm bg-white hover:bg-gray-50">
                            <i class="fab fa-qq text-blue-500 text-xl"></i>
                        </button>
                        <button
                            class="flex justify-center items-center py-2 px-4 border border-gray-300 rounded-md shadow-sm bg-white hover:bg-gray-50">
                            <i class="fab fa-weibo text-red-500 text-xl"></i>
                        </button>
                    </div>
                </div>

                <!-- 注册表单 -->
                <div id="register-form" class="mt-8 hidden">
                    <div class="mb-6">
                        <label for="register-username" class="block text-gray-700 text-sm font-medium mb-2">用户名</label>
                        <div class="relative">
                            <div class="absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none">
                                <i class="fas fa-user text-gray-400"></i>
                            </div>
                            <input id="register-username" type="text"
                                class="pl-10 w-full py-3 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent"
                                placeholder="请输入用户名(至少3个字符)">
                        </div>
                        <p id="register-username-error" class="text-red-500 text-xs mt-1 hidden">用户名至少需要3个字符</p>
                    </div>
                    <div class="mb-6">
                        <label for="register-email" class="block text-gray-700 text-sm font-medium mb-2">电子邮箱</label>
                        <div class="relative">
                            <div class="absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none">
                                <i class="fas fa-envelope text-gray-400"></i>
                            </div>
                            <input id="register-email" type="email"
                                class="pl-10 w-full py-3 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent"
                                placeholder="请输入您的电子邮箱">
                        </div>
                        <p id="register-email-error" class="text-red-500 text-xs mt-1 hidden">请输入有效的电子邮箱</p>
                    </div>
                    <div class="mb-6">
                        <label for="register-password" class="block text-gray-700 text-sm font-medium mb-2">密码</label>
                        <div class="relative">
                            <div class="absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none">
                                <i class="fas fa-lock text-gray-400"></i>
                            </div>
                            <input id="register-password" type="password"
                                class="pl-10 w-full py-3 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent"
                                placeholder="请设置密码(至少6位)">
                            <button id="toggle-register-password" type="button"
                                class="absolute inset-y-0 right-0 pr-3 flex items-center">
                                <i class="fas fa-eye-slash text-gray-400"></i>
                            </button>
                        </div>
                        <p id="register-password-error" class="text-red-500 text-xs mt-1 hidden">密码至少需要6个字符</p>
                    </div>
                    <div class="mb-6">
                        <label for="register-confirm-password"
                            class="block text-gray-700 text-sm font-medium mb-2">确认密码</label>
                        <div class="relative">
                            <div class="absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none">
                                <i class="fas fa-lock text-gray-400"></i>
                            </div>
                            <input id="register-confirm-password" type="password"
                                class="pl-10 w-full py-3 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent"
                                placeholder="请再次输入密码">
                            <button id="toggle-register-confirm-password" type="button"
                                class="absolute inset-y-0 right-0 pr-3 flex items-center">
                                <i class="fas fa-eye-slash text-gray-400"></i>
                            </button>
                        </div>
                        <p id="register-confirm-password-error" class="text-red-500 text-xs mt-1 hidden">两次输入的密码不一致</p>
                    </div>
                    <div class="mb-6">
                        <div class="flex items-center">
                            <input id="terms" type="checkbox"
                                class="h-4 w-4 text-blue-600 focus:ring-blue-500 border-gray-300 rounded">
                            <label for="terms" class="ml-2 block text-sm text-gray-700">
                                我已阅读并同意 <a href="#" class="text-blue-600 hover:text-blue-800">用户协议</a> 和 <a href="#"
                                    class="text-blue-600 hover:text-blue-800">隐私政策</a>
                            </label>
                        </div>
                        <p id="terms-error" class="text-red-500 text-xs mt-1 hidden">请同意用户协议和隐私政策</p>
                    </div>
                    <div class="mb-6">
                        <button id="register-button"
                            class="w-full bg-gradient-to-r from-blue-600 to-blue-500 text-white py-3 px-4 rounded-lg hover:from-blue-700 hover:to-blue-600 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2 transition-all duration-300 transform hover:-translate-y-0.5">
                            <i class="fas fa-user-plus mr-2"></i>创建账号
                        </button>
                    </div>
                    <div class="text-center">
                        <p class="text-sm text-gray-600">已有账号？ <a href="#" id="switch-to-login"
                                class="text-blue-600 hover:text-blue-800">返回登录</a></p>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <!-- 操作结果通知 -->
    <div id="notification"
        class="fixed bottom-4 right-4 bg-green-500 text-white p-4 rounded-lg shadow-lg transform translate-y-20 opacity-0 transition-all duration-300 z-50 hidden">
        操作成功
    </div>

    <!-- 页脚 -->
    <footer class="bg-gray-800 text-white py-8 mt-12">
        <div class="container mx-auto px-4">
            <div class="grid grid-cols-1 md:grid-cols-4 gap-8">
                <div>
                    <h4 class="text-lg font-bold mb-4">关于我们</h4>
                    <p class="text-gray-400">钓鱼天堂是一个致力于为钓鱼爱好者提供交流平台和专业装备的综合性网站。</p>
                </div>
                <div>
                    <h4 class="text-lg font-bold mb-4">快速链接</h4>
                    <ul class="space-y-2 text-gray-400">
                        <li><a href="index.html" class="hover:text-white transition">首页</a></li>
                        <li><a href="forum.html" class="hover:text-white transition">论坛</a></li>
                        <li><a href="mall.html" class="hover:text-white transition">商城</a></li>
                        <li><a href="auth.html" class="hover:text-white transition">注册/登录</a></li>
                    </ul>
                </div>
                <div>
                    <h4 class="text-lg font-bold mb-4">联系我们</h4>
                    <ul class="space-y-2 text-gray-400">
                        <li><i class="fas fa-envelope mr-2"></i> contact@fishingheaven.com</li>
                        <li><i class="fas fa-phone mr-2"></i> 400-123-4567</li>
                        <li><i class="fas fa-map-marker-alt mr-2"></i> 渔乐路88号钓鱼天堂大厦</li>
                    </ul>
                </div>
                <div>
                    <h4 class="text-lg font-bold mb-4">关注我们</h4>
                    <div class="flex space-x-4">
                        <a href="#" class="text-gray-400 hover:text-white text-xl transition"><i
                                class="fab fa-weixin"></i></a>
                        <a href="#" class="text-gray-400 hover:text-white text-xl transition"><i
                                class="fab fa-weibo"></i></a>
                        <a href="#" class="text-gray-400 hover:text-white text-xl transition"><i
                                class="fab fa-qq"></i></a>
                        <a href="#" class="text-gray-400 hover:text-white text-xl transition"><i
                                class="fab fa-tiktok"></i></a>
                    </div>
                </div>
            </div>
            <div class="border-t border-gray-700 mt-8 pt-6 text-center text-gray-400">
                <p>&copy; 2025 钓鱼天堂 版权所有 | 钓友们的网上家园</p>
            </div>
        </div>
    </footer>

    <!-- 粒子效果 -->
    <script src="https://cdnjs.cloudflare.com/ajax/libs/particles.js/2.0.0/particles.min.js"></script>
    <script src="js/app.js"></script>
    <script type="module" src="./js/childJS/authChild.js"></script>
</body>

</html>